import React, {useEffect} from 'react';
import {Layout} from 'antd';
import IndexHeader from "@/pages/Index/components/IndexHeader";
import IndexSider from "@/pages/Index/components/IndexSider";
import IndexContent from "@/pages/Index/components/IndexContent";
import IndexFooter from "@/pages/Index/components/IndexFooter";
import "./index.less";
import {useAppDispatch} from "@/hooks";
import {getInfoAsync} from "@/store/slice/auth";
const Index: React.FC = () => {
    const dispatch = useAppDispatch()
    useEffect(() => {
        (async() => {await dispatch(getInfoAsync())})()
    },[])
    return (
        <Layout style={{minHeight: '100vh'}}>
            <IndexSider/>
            <Layout className="site-layout">
               <IndexHeader/>
               <IndexContent/>
               <IndexFooter/>
            </Layout>
        </Layout>
    );
};
export default Index;